﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Collections.Specialized.BitVector32;
using Volo.Abp.Domain.Entities.Auditing;
using SanJ.FreeCare.TypeFramework;
using SanJ.FreeCare.ParticiPants;
using SanJ.FreeCare.Reactions;

namespace SanJ.FreeCare.AllergyIntolerances
{
    /// <summary>
    /// 过敏或不耐受类（通常：对某种物质产生不良反应的风险）
    /// </summary>
    public partial class AllergyIntolerance : AuditedAggregateRoot<Guid>
    {
        /// <summary>
        ///  值类型
        ///  id,meta, implicitRules, language, text, contained, extension, modifierExtension
        /// </summary>
        public Identifier[] Identifier { get; private set; }

        /// <summary>
        /// 临床状态 active | inactive | resolved   活动 |非活动 |已解决
        /// 过敏或不耐受的临床状态。
        /// </summary>
        public string ClinicalStatusCode { get; private set; }

        /// <summary>
        /// 验证状态   unconfirmed | presumed | confirmed | refuted | entered-in-error  未确认 |推测 |已确认 |驳斥 |输入错误
        /// 已识别物质（包括药品）的反应倾向或潜在风险相关的确定性的断言
        /// </summary>
        public string VerificationStatusCode { get; private set; }

        /// <summary>
        /// 类型      过敏 |不耐受 - 潜在机制（如果已知）
        /// </summary>
        public string TypeCode { get; private set; }

        /// <summary>
        /// 类别 food | medication | environment | biologic    食品 |药物治疗 |环境 |生物结合
        /// 已识别物质的类别。
        /// </summary>
        public string[] Category { get; private set; }

        /// <summary>
        /// 临界性  Low | high | unable-to-assess
        /// 估计对已鉴定物质的反应的潜在临床危害或严重性。
        /// </summary>
        public string Criticality { get; private set; }

        /// <summary>
        /// 物质代码、术语
        /// </summary>
        public string Code { get; private set; }

        /// <summary>
        /// 患者
        /// </summary>
        public Guid PatientId { get; private set; }

        /// <summary>
        /// 未知？
        /// </summary>
        public Guid EncounterId { get; private set; }

        /// <summary>
        ///  实际日期时间  dateTime|Age|Period|Range|string
        /// </summary>
        public DateTime OnsetDateTime { get; private set; }

        /// <summary>
        /// 实际年龄
        /// </summary>
        public string OnsetAge { get; private set; }

        /// <summary>
        /// 记录时间
        /// </summary>
        public DateTime RecordedDate { get; private set; }

        /// <summary>
        /// 区分参与者参与与过敏或不耐受有关的活动的类型
        /// </summary>
        public ParticiPant[] ParticiPant { get; private set; }


        /// <summary>
        /// 最后一次修改时间
        /// </summary>
        public DateTime LastOccurrence { get; private set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Note { get; private set; }

        /// <summary>
        /// 反应
        /// </summary>
        public Reaction[] Reaction { get; private set; }


        public AllergyIntolerance()
        {

        }



    }
}
